<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html >
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
	<style type="text/css">
		#container{
			margin-top:50px;
		}
		#div{
			position:relative;
		}
		#navdiv{
			position:absolute;
			right:5px;
			bottom:0px;
		}
		
	</style>
</head>
<body>
		<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand" style="color:#fff">Kaishengit PMS</a>
			</div>
		</div>
	</div>
	<div class="container" id="container">
		<div class="row">
			<div class="span3">
				<div class="well" style="padding:8px 0;">
						<ul class="nav nav-list">
							<li class="nav-header" style="padding-top:0px">新Apple总部项目</li>
							<li class="divider"></li>
							<li ><a href="#"><i class="icon-white icon-home"></i>最新动态</a></li>
							<li><a href="goal.html"><i class="icon-flag"></i>目标</a></li>
							<li><a href="#"><i class="icon-folder-open"></i>资料库</a></li>
							<li><a href="#"><i class="icon-file"></i>文件共享</a></li>
							<li ><a href="#"><i class="icon-user"></i>联系人</a></li>
							<li class="active"><a href="#"><i class="icon-fire"></i>想法</a></li>
							<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
							<li><a href="#"><i class="icon-cog"></i>项目设置</a></li>
						</ul>
					</div>
			</div>
		<div class="span9" id="div">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius:3px 3px 0 0">
					<li><a href="#" style="color:#000"><i class="icon-fire"></i>想法</a></li>
					<li style="float:right"><a href="project.jspx?m=addIdea" style="color:#000"><i class="icon-plus"></i>发表新想法</a></li>
			</ul>
			
				<div class="wall" style="border:1px solid #ccc;height:350px;border-top:none;padding:15px">
						<c:choose>
							<c:when test="${empty page.result}">
								此项目还没有发表过想法！
							</c:when>
							<c:otherwise>
								<c:forEach items="${page.result }" var="page">
									<blockquote>
										<h4><a href="project.jspx?m=toIdea&id=${page.id }" >${page.title }</a></h4>
										<p>${page.content }</p>
										<small>${page.employee.username }发布于 ${page.time }</small>
										<a href="project.jspx?m=editIdea&id=${page.id }" title="编辑"><i class="icon-pencil"></i></a>
										<a href="project.jspx?m=deleteIdea&id=${page.id }" title="删除"><i class="icon-trash"></i></a>
									</blockquote>
								</c:forEach>
									<c:if test="${param.code == 1002 }">
						<div style="color:red;font-size:20px">您没有修改权限</div>
							</c:if>
							<c:if test="${param.code == 1003 }">
								<div style="color:red;font-size:20px">该想法已被评论，无法修改！</div>
							</c:if>
							<c:if test="${param.code == 1004 }">
								<div style="color:red;font-size:20px">想法发布修改时间已过！</div>
							</c:if>
								<div class="pagination" style="float:right;" id="navdiv">
									<ul>
										
										<li><a href="project.jspx?m=idea&p=1">Prev</a></li>
										<li class="active"><a href="project.jspx?m=idea&p=1">1</a></li>
										<li><a href="project.jspx?m=idea&p=2">2</a></li>
										<li><a href="project.jspx?m=idea&p=3">3</a></li>
										<li><a href="project.jspx?m=idea&p=4">4</a></li> 
										<li><a href="project.jspx?m=idea&p=${page.pageNum + 1 }">Next</a></li>
									</ul>
								</div>
							</c:otherwise>
					</c:choose>
				
				</div>
						
				
					
				
		</div>
	</div>
</div>
</body>
</html>